package siddur.traktask.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;



public class DateUtil {
	
	
	private static final SimpleDateFormat formatter = new SimpleDateFormat(
			"yyyyMMdd");
	
	
	public static String date2String(Date d){
		return formatter.format(d);
	}
	
	public static Date string2Date(String s){
		try {
			return formatter.parse(s);
		} catch (ParseException e) {
		}
		return null;
	}
}
